﻿@namespace MudBlazor.UnitTests.TestComponents

<MudPopoverProvider />

<MudDataGrid Items="@_items" Hideable="true" ShowMenuIcon="true">
    <Columns>
        <PropertyColumn Property="x => x.Name" Hidden="false" />
        <PropertyColumn Property="x => x.Age" Hidden=@hiddenAge />
        <PropertyColumn Property="x => x.Prop1" @bind-Hidden=@hiddenProp1 />
        <PropertyColumn Property="x => x.Prop2" Hidden="false" Hideable="false" />
        <PropertyColumn Property="x => x.Prop3" Hidden=@hiddenProp3 Hideable="false" />
        <PropertyColumn Property="x => x.Prop4" @bind-Hidden=@hiddenProp4 Hideable="false" />
    </Columns>
</MudDataGrid>

@code {
    private bool hiddenAge = false;
    private bool hiddenProp1;
    private bool hiddenProp3 = false;
    private bool hiddenProp4;
    private readonly IEnumerable<Model> _items = new List<Model>()
    {
        new Model("John", 45, true, true, true, true),
        new Model("Johanna", 23, true, true, true, true),
        new Model("Steve", 32, true, true, true, true)
    };

    public record Model(string Name, int Age, bool Prop1, bool Prop2, bool Prop3, bool Prop4);
}